<?php

namespace IDock\Insurance\JTIC\Response;

use IDock\Http\Response;
use IDock\Insurance\JTIC\Response\AllJTICResponse;
use IDock\Printer\EPolicyDownloadPrinter;

class EPolicyDownloadResponse extends AllJTICResponse
{

    public $data = '';

    /**
     * @var EPolicyDownloadPrinter $printer
     */
    public $printer = EPolicyDownloadPrinter::class;

    public function printerInit(): Response
    {
        $body = $this->getBody();

        if ($this->printer) {
            $this->printer = new $this->printer;
        }
        $this->data = $body;

        return $this;
    }
}
